/**
 * <copyright>
 * </copyright>
 *

 */
package br.pucrio.inf.tamdera.util;

import br.pucrio.inf.tamdera.*;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.Switch;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see br.pucrio.inf.tamdera.TamderaPackage
 * @generated
 */
public class TamderaSwitch<T> extends Switch<T>
{
  /**
   * The cached model package
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected static TamderaPackage modelPackage;

  /**
   * Creates an instance of the switch.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public TamderaSwitch()
  {
    if (modelPackage == null)
    {
      modelPackage = TamderaPackage.eINSTANCE;
    }
  }

  /**
   * Checks whether this is a switch for the given package.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @parameter ePackage the package in question.
   * @return whether this is a switch for the given package.
   * @generated
   */
  @Override
  protected boolean isSwitchFor(EPackage ePackage)
  {
    return ePackage == modelPackage;
  }

  /**
   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @return the first non-null result returned by a <code>caseXXX</code> call.
   * @generated
   */
  @Override
  protected T doSwitch(int classifierID, EObject theEObject)
  {
    switch (classifierID)
    {
      case TamderaPackage.RULES_SPECIFICATION:
      {
        RulesSpecification rulesSpecification = (RulesSpecification)theEObject;
        T result = caseRulesSpecification(rulesSpecification);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.PARAGRAPH:
      {
        Paragraph paragraph = (Paragraph)theEObject;
        T result = caseParagraph(paragraph);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.CONSTRAINT_SET_DECLARATION:
      {
        ConstraintSetDeclaration constraintSetDeclaration = (ConstraintSetDeclaration)theEObject;
        T result = caseConstraintSetDeclaration(constraintSetDeclaration);
        if (result == null) result = caseParagraph(constraintSetDeclaration);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.CONCEPT_DECLARATION:
      {
        ConceptDeclaration conceptDeclaration = (ConceptDeclaration)theEObject;
        T result = caseConceptDeclaration(conceptDeclaration);
        if (result == null) result = caseParagraph(conceptDeclaration);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.DEPENDENCY_RULE_DECLARATION:
      {
        DependencyRuleDeclaration dependencyRuleDeclaration = (DependencyRuleDeclaration)theEObject;
        T result = caseDependencyRuleDeclaration(dependencyRuleDeclaration);
        if (result == null) result = caseParagraph(dependencyRuleDeclaration);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.PACKAGE_MAPPING:
      {
        PackageMapping packageMapping = (PackageMapping)theEObject;
        T result = casePackageMapping(packageMapping);
        if (result == null) result = caseConceptMap(packageMapping);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.REG_EXPRESSION_MAPPING:
      {
        RegExpressionMapping regExpressionMapping = (RegExpressionMapping)theEObject;
        T result = caseRegExpressionMapping(regExpressionMapping);
        if (result == null) result = caseConceptMap(regExpressionMapping);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.PARENT_MAPPING:
      {
        ParentMapping parentMapping = (ParentMapping)theEObject;
        T result = caseParentMapping(parentMapping);
        if (result == null) result = caseConceptMap(parentMapping);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.PREFIX_MAPPING:
      {
        PrefixMapping prefixMapping = (PrefixMapping)theEObject;
        T result = casePrefixMapping(prefixMapping);
        if (result == null) result = caseConceptMap(prefixMapping);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.SUFFIX_MAPPING:
      {
        SuffixMapping suffixMapping = (SuffixMapping)theEObject;
        T result = caseSuffixMapping(suffixMapping);
        if (result == null) result = caseConceptMap(suffixMapping);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.NAME_CLASS_MAPPING:
      {
        NameClassMapping nameClassMapping = (NameClassMapping)theEObject;
        T result = caseNameClassMapping(nameClassMapping);
        if (result == null) result = caseConceptMap(nameClassMapping);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.CONCEPT_MAP:
      {
        ConceptMap conceptMap = (ConceptMap)theEObject;
        T result = caseConceptMap(conceptMap);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.CONSTRAINT:
      {
        Constraint constraint = (Constraint)theEObject;
        T result = caseConstraint(constraint);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TamderaPackage.METRIC_CONSTRAINT:
      {
        MetricConstraint metricConstraint = (MetricConstraint)theEObject;
        T result = caseMetricConstraint(metricConstraint);
        if (result == null) result = caseConstraint(metricConstraint);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      default: return defaultCase(theEObject);
    }
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Rules Specification</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Rules Specification</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseRulesSpecification(RulesSpecification object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Paragraph</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Paragraph</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseParagraph(Paragraph object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Constraint Set Declaration</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Constraint Set Declaration</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseConstraintSetDeclaration(ConstraintSetDeclaration object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Concept Declaration</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Concept Declaration</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseConceptDeclaration(ConceptDeclaration object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Dependency Rule Declaration</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Dependency Rule Declaration</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseDependencyRuleDeclaration(DependencyRuleDeclaration object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Package Mapping</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Package Mapping</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T casePackageMapping(PackageMapping object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Reg Expression Mapping</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Reg Expression Mapping</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseRegExpressionMapping(RegExpressionMapping object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Parent Mapping</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Parent Mapping</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseParentMapping(ParentMapping object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Prefix Mapping</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Prefix Mapping</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T casePrefixMapping(PrefixMapping object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Suffix Mapping</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Suffix Mapping</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseSuffixMapping(SuffixMapping object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Name Class Mapping</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Name Class Mapping</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseNameClassMapping(NameClassMapping object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Concept Map</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Concept Map</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseConceptMap(ConceptMap object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Constraint</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Constraint</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseConstraint(Constraint object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Metric Constraint</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Metric Constraint</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseMetricConstraint(MetricConstraint object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch, but this is the last case anyway.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
   * @generated
   */
  @Override
  public T defaultCase(EObject object)
  {
    return null;
  }

} //TamderaSwitch
